﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SuperSerialization.Tree
{
    /// <summary>
    /// Represents an array value.
    /// </summary>
    class ArrayNode : Node
    {
        /// <summary>
        /// The value nodess of the array.
        /// </summary>
        public Node[] Values;

        /// <summary>
        /// Constructs and array node.
        /// </summary>
        /// <param name="values">A list of the values in the array.</param>
        public ArrayNode(Node[] values)
        {
            // TODO: Verify that all values are the same type?
            this.Values = values;
        }

        public override void Accept(TreeVisitor.AbstractVisitor visitor)
        {
            visitor.VisitArray(this);
        }
    }
}
